Object.defineProperty(exports, "__esModule", {
    value: !0
});

var e = Object.assign || function(e) {
    for (var t = 1; t < arguments.length; t++) {
        var r, n = arguments[t];
        for (r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
    }
    return e;
}, t = {
    selector: "#poster"
};

function r() {
    var r = arguments[1], n = e({}, t, n = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : {}), o = (o = getCurrentPages())[o.length - 1];
    return r && (o = r), o = o.selectComponent(n.selector), delete n.selector, o;
}

r.create = function() {
    var e = 0 < arguments.length && void 0 !== arguments[0] && arguments[0], t = arguments[1], n = arguments[2];
    return new Promise(function(o, c) {
        if (r({}, n)) return r({}, n).onCreate(e, t).then(function(e) {
            o(e);
        }).catch(function(e) {
            c(e);
        });
        c('请设置组件的id="poster"!!!'), console.error('请设置组件的id="poster"!!!');
    });
}, exports.default = r;